import math

class Shape:
    def __init__(self, x, y):
        self.x = x
        self.y = y
    def goto_origin(self):
        self.x = 0
        self.y = 0
    def goto(self, x, y):
        self.x = x
        self.y = y


class Circle(Shape):
    def __init__(self, x, y, r=1):
        Shape.__init__(self, x, y)
        self.radius = r
    def __str__(self):
        return "Circle(x=%d, y=%d, radius=%d)" % (self.x, self.y, self.radius)
    def area(self):
        return math.pi * self.radius ** 2

class Square(Shape):
    def __init__(self, x, y, size=1):
        Shape.__init__(self, x, y)
        self.size = size
    def __str__(self):
        return "Square(x=%d, y=%d, size=%d)" % (self.x, self.y, self.size)
    def area(self):
        return self.size ** 2


c1 = Circle(1,2)        # constructeur
c2 = Circle(2,3, 2)
c3 = Square(1,1, 3)

print c1
print c1.radius
print c1.area()
Circle.goto_origin(c2)    # c2.goto_origin()
c2.goto(2,1)
print c2
print c2.radius
print c2.area()

print c3
print c3.size
print c3.area()

c1 = "Hello"

print c1

def build_circle(r):
    return {"radius": r}

def area(circle):
    return math.pi * circle["radius"] ** 2

c3 = build_circle(2)
print c3
print area(c3)